function CssEncodeE(_input){

function hex(){
var h = 0;
if (hex.arguments.length == 1)
{
h = hex.arguments[0] & 0xF;
h = (h <= 9 ? h + 48 : h + 55);
}
else if (hex.arguments.length > 1)
{
h = (hex.arguments[1] >> (4 * hex.arguments[0])) & 0xF;
h = (h <= 9 ? h + 48 : h + 55);
}
return h;
};
var result = new Array();
var _HS = false;
var _hs = 0x0;
for (var _i = 0; _i < _input.length; _i++) {
var _c = _input.charCodeAt(_i);
if (((_c == 0xFFFE) || (_c == 0xFFFF))){
throw {name:'InvalidInput'};
}
else if (_HS){
if (!((_c >= 0xDC00) && (_c <= 0xDFFF))){
throw {name:'InvalidInput'};
}
else {
result.push(String.fromCharCode(hex(((_hs << 0x2) | ((_c >> 0x8) & 0x3))), hex(0x1,_c), hex(_c)));
_HS = false;
_hs = 0x0;
}
}
else if (true){
if (((_c >= 0xDC00) && (_c <= 0xDFFF))){
throw {name:'InvalidInput'};
}
else {
if (((_c >= 0xD800) && (_c <= 0xDBFF))){
result.push(String.fromCharCode(0x5C, ((((_c >> 0x6) & 0xF) == 0xF) ? 0x31 : 0x30), hex(((_c >> 0x6) + 0x1)), hex((_c >> 0x2))));
_HS = true;
_hs = (_c & 0x3);
}
else {
if ((_c > 0xFF)){
result.push(String.fromCharCode(0x5C, 0x30, 0x30, hex(0x3,_c), hex(0x2,_c), hex(0x1,_c), hex(_c)));
}
else {
if (String.fromCharCode(_c).match(/^([0-9A-Za-z])$/)){
result.push(String.fromCharCode(_c));
}
else {
result.push(String.fromCharCode(0x5C, 0x30, 0x30, 0x30, 0x30, hex(0x1,_c), hex(_c)));
}
}
}
}
}
}
if (_HS){
throw {name:'InvalidInput'};
}
else if (true){
}
return result.join('');
}
